package cn.yinyu.queue.module.ecg.enums;

import cn.yinyu.queue.framework.common.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 通用状态枚举
 *
 * @author 垠域源码
 */
@Getter
@AllArgsConstructor
public enum BedStatusEnum implements IntArrayValuable {
    CLOSED(0, "已关闭"),
    OPENING(10, "已开通"),
    DOCTOR_ON(20, "有医生"),
    PAUSE(30, "暂停");

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BedStatusEnum::getStatus).toArray();

    /**
     * 状态值
     */
    private final Integer status;
    /**
     * 状态名
     */
    private final String name;

    @Override
    public int[] array() {
        return ARRAYS;
    }

/*
    public static boolean isEnable(Integer status) {
        return ObjUtil.equal(ENABLE.status, status);
    }

    public static boolean isDisable(Integer status) {
        return ObjUtil.equal(DISABLE.status, status);
    }
*/

}
